package com.shuma.product.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @TableName goods_base_info
 */
@TableName(value ="goods_base_info")
@Data
public class BaseGoods implements Serializable {
    /**
     * 
     */
    @TableId
    private Long goodsBaseId;

    /**
     * 
     */
    private String goodsName;

    /**
     * 
     */
    private Integer goodsStock;

    /**
     * 
     */
    private LocalDateTime onlineTime;

    /**
     * 
     */
    private LocalDateTime expireTime;

    /**
     * 
     */
    private Long operatorId;

    /**
     * 
     */
    private String operator;

    /**
     * 
     */
    private Integer goodsOwnerStatus;

    /**
     * 
     */
    private Integer goodsCheckStatus;

    /**
     * 
     */
    private Integer goodsOnlineStatus;

    /**
     * 
     */
    private Integer isdelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BaseGoods other = (BaseGoods) that;
        return (this.getGoodsBaseId() == null ? other.getGoodsBaseId() == null : this.getGoodsBaseId().equals(other.getGoodsBaseId()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
            && (this.getGoodsStock() == null ? other.getGoodsStock() == null : this.getGoodsStock().equals(other.getGoodsStock()))
            && (this.getOnlineTime() == null ? other.getOnlineTime() == null : this.getOnlineTime().equals(other.getOnlineTime()))
            && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime()))
            && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId()))
            && (this.getOperator() == null ? other.getOperator() == null : this.getOperator().equals(other.getOperator()))
            && (this.getGoodsOwnerStatus() == null ? other.getGoodsOwnerStatus() == null : this.getGoodsOwnerStatus().equals(other.getGoodsOwnerStatus()))
            && (this.getGoodsCheckStatus() == null ? other.getGoodsCheckStatus() == null : this.getGoodsCheckStatus().equals(other.getGoodsCheckStatus()))
            && (this.getGoodsOnlineStatus() == null ? other.getGoodsOnlineStatus() == null : this.getGoodsOnlineStatus().equals(other.getGoodsOnlineStatus()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGoodsBaseId() == null) ? 0 : getGoodsBaseId().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getGoodsStock() == null) ? 0 : getGoodsStock().hashCode());
        result = prime * result + ((getOnlineTime() == null) ? 0 : getOnlineTime().hashCode());
        result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode());
        result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode());
        result = prime * result + ((getOperator() == null) ? 0 : getOperator().hashCode());
        result = prime * result + ((getGoodsOwnerStatus() == null) ? 0 : getGoodsOwnerStatus().hashCode());
        result = prime * result + ((getGoodsCheckStatus() == null) ? 0 : getGoodsCheckStatus().hashCode());
        result = prime * result + ((getGoodsOnlineStatus() == null) ? 0 : getGoodsOnlineStatus().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", goodsBaseId=").append(goodsBaseId);
        sb.append(", goodsName=").append(goodsName);
        sb.append(", goodsStock=").append(goodsStock);
        sb.append(", onlineTime=").append(onlineTime);
        sb.append(", expireTime=").append(expireTime);
        sb.append(", operatorId=").append(operatorId);
        sb.append(", operator=").append(operator);
        sb.append(", goodsOwnerStatus=").append(goodsOwnerStatus);
        sb.append(", goodsCheckStatus=").append(goodsCheckStatus);
        sb.append(", goodsOnlineStatus=").append(goodsOnlineStatus);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}